package com.example.demo.common.tools;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * Request请求拦截
 * @author bill
 *
 */
public class RequestIntercept implements HandlerInterceptor {
	


	 /**
	  * 请求拦截
     * @param request
     * @param response
     * @param handler
     * @return
     * @throws Exception
     */
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
    	request.setCharacterEncoding("UTF-8");
        
    	return true;
    }
    
    

}
